
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<table class="table">
    <thead>
    <tr>
        <th>ID</th>
        <th>姓名</th>
        <th>性别</th>
        <th>年龄</th>
        <th>简介</th>
        <th>操作</th>
        <th>加关注</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${pageData.data}" var="u">
        <tr>
            <th scope="row">${u.id}</th>
            <td>${u.realName}</td>
            <td>${u.gender ==0?'女':'男'}</td>
            <td>${u.age}</td>
            <td>${u.desc}</td>
            <td>
                <a href="${pageContext.request.contextPath}/user/userDetail?name=${u.username}"  class="btn-xs btn-primary userDetail">详细信息</a>
                    <%--<input type="submit" value="详细信息" class="btn-xs btn-primary userDetail">--%>
            </td>
            <td>
                <input type="checkbox" value="" class="checkbox-template" id="${u.id}" <c:forEach items="${aFocus}" var="af"><c:if test="${af.userFocusId == u.id}">checked disabled=""</c:if></c:forEach>>
                    <%--<input type="hidden" name="focus" id="f0" value="">--%>
            </td>
        </tr>
    </c:forEach>

    </tbody>
</table>

<nav class="text-center" aria-label="Page navigation">
    <ul class="pagination">
        <li>
            <%--<c:if test="${pageData.currPage ==1}">${pageData.currPage ==1}</c:if>--%>
            <a href="${pageContext.request.contextPath}/user/findPage?currPage=${pageData.currPage-1 ==0?1:pageData.currPage-1}" aria-label="Previous">
                <span aria-hidden="true">&laquo;</span>
            </a>
        </li>
        <c:forEach begin="1" end="${pageData.totalPage}" var="page">
            <li><a href="${pageContext.request.contextPath}/user/findPage?currPage=${page}">${page}</a></li>
        </c:forEach>
        <li>
            <a href="${pageContext.request.contextPath}/user/findPage?currPage=${pageData.currPage+1 >pageData.totalPage?pageData.currPage:pageData.currPage+1}" aria-label="Next">
                <span aria-hidden="true">&raquo;</span>
            </a>
        </li>
    </ul>
</nav>
